package com.demo.service;

import mapper.FrMapper;
import mapper.FrTask;
import mapper.FrUser;
import mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * User: yuebo
 * Date: 13-9-8
 * Time: 下午3:49
 */
@Service
public class FrService {
    @Autowired
    private UserMapper userMapper;
    @Autowired
    private FrMapper frMapper;

    public void setFrMapper(FrMapper frMapper) {
        this.frMapper = frMapper;
    }

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    public FrUser findFrUser(int userId){
        return userMapper.getFrUser(userId);
    }

    public List<FrTask> findTask(int start, int end){
        return frMapper.findTask(start,end);
    }

    public FrTask findTaskById(int id){
        return frMapper.findTaskById(id);
    }

}
